from paddlespeech.t2s.exps.syn_utils import get_frontend
import pathlib
from g2p_en import G2p




if __name__ == '__main__':
    english_text_frontend = get_frontend(lang='en', phones_dict=pathlib.PosixPath(
            '/home/fastspeech2_ljspeech_static_1.1.0/phone_id_map.txt'))
    result = english_text_frontend.get_input_ids("ok,I'm eating food. He's eating food.")
    # result1 = english_text_frontend("I'm eating food")
    print(english_text_frontend.vocab_phones)
    # print(english_text_frontend.vocab_phones)
    print(result)
    # print(result1)
    g2p = G2p()
    print(g2p("ok,I'm eating food. He's eating food. asdwqe"))
